Private Sub cmd1_Click() 'declare counter variable Dim i As Integer 'code for loop For i = 1 To 4 Step 1 Print i Next i 'in print ; for close to each other prints and , for prints on separate lines Print i; "outer" End Sub Private Sub cmdadd_Click() 'declaring valuables Dim i As Integer, c As Integer 'to add 1 through 6 For i = 1 To 6 Step 1 'accumulators value c = c + i Next i 'result Print "sum is "; c End Sub Private Sub cmdDoloop_Click() ' do loop example Dim count As Integer 'initial value of counter is set by dafault ' as count=0 ' to add first 5 digits from 0 Do While count < 5 Print count count = count + 1 Loop Print "outer "; count End Sub Private Sub cmdstep2_Click() Dim i As Integer Dim c As Integer 'fro loop with step 2 For i = 5 To 10 Step 2 Print i 'c is an accumulator c = c + i Next i Print "c is "; c End Sub Private Sub cmdSum_Click() 'to add 10 even numbers 'to initialize c c = 0 For i = 1 To 10 Step 1 c = c + i * 2 Next i Print c End Sub